﻿namespace IOPvsOOP.Polymorphism.NOIF
{
    public abstract class Employee
    {
        protected Employee(int days)
        {
            Days = days;
        }

        public string Name { get; set; }
        public string Last { get; set; }
        public string Number { get; set; }
        protected int Days { get; set; }
        public abstract double Salary();
    }

    public class Director : Employee
    {
        public Director(int days) : base(days) { }

        public override double Salary()
        {
            return Days*100;
        }
    }

    public class LeaderPolymorphism : Employee
    {
        public LeaderPolymorphism(int days) : base(days) { }

        public override double Salary()
        {
            return Days * 45;
        }
    }
}